home *** CD-ROM | disk | FTP | other *** search
- Path: vb.franken.de!volker
- From: volker@vb.franken.de (Volker Barthelmann)
- Subject: Re: 680X0 -> PPC translator?
- Newsgroups: comp.sys.amiga.programmer
- References: <volker.0g32@vb.franken.de> <315C198B.49C2@netvision.net.il> <volker.0g5w@vb.franken.de> <1996Apr2.230841.8275@scala.scala.com>
- X-Newsreader: TIN [AMIGA 1.3 950726BETA PL0]
- Message-ID: <volker.0g8b@vb.franken.de>
- Date: 3 Apr 96 23:15:40 MET
- Organization: home
-
- Dave Haynie (dave.haynie@scala.com) wrote:
- :
- : >Unfortunately You have to know about all other memory areas as well,
- : >because otherwise You cannot determine what is code and what is data.
- :
- : Sure you can. The practical binary translators that exist today (and
- : there are some, which work very well) do this very simply. They work
- : in conjunction with an emulator, and the emulator keeps track of what
- : runs and what doesn't. Anything that's executed is code, and such a
- : chunk can itself be translated based on static analysis. Anything that
- : doesn't run might not be code. So you don't translate it; if it's
- : data, you're safe. If it's code, and it never runs, there's no point
- : in translating it. If it does run later, you translate it later.
-
- But that's not what we were talking about! We were talking about a static
- and complete translation of 68k to PPC before it is executed.
-
- : >Think about: The program writes a value somwhere. Then copies it around,
- : >shifts it, moves it again etc. and than sometimes it reads it from where
- : >it is now, loads it in a0 and does a jmp (a0) or so.
- :
- : The AmigaOS and the 680x0 don't support self-modifying code.
-
- I was not talking of self-modifying code there. Only the address of the
- code is modified and copied around, but a static translator would have
- to know where the jump goes to in order to decide what's code.
-
- Sorry if this was not clear.
-
- : >Still I claim You can't even reliably decide what is code and what is data.
- : >Even if self-modifying code is forbidden.
- :
- : You can, using dynamic flow analysis. DEC does this, quite
-
- Again, I was talking about static translation.
-
- : So basically, stop the arguments, I'm offering an existance proof.
-
- Not for static translators.
-
- Volker
-
-